#ifndef __HTTP_CONNECT_H__
#define __HTTP_CONNECT_H__

#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <stdarg.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>

#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>

class HttpConnect
{
   public:
    HttpConnect();
    ~HttpConnect();

   private:
    void socketHttp(std::string request);
    int sockfd;

   public:
    void Init();
    void postData(std::string host, std::string path, std::string post_content);
    void getData(std::string host, std::string path, std::string get_content);
    void keepConnect(std::string host, std::string path);
    void closeConnect(std::string host, std::string path);
};

#endif